<div id="container">
    <form method="post" id="submit" name="submit">
        <div class="table-header">
            Danh sách thành viên
        </div>
        <div id="sample-table-2_wrapper" class="dataTables_wrapper" role="grid">
            <table id="sample-table-2" class="table table-striped table-bordered table-hover dataTable" aria-describedby="sample-table-2_info">
                <thead>
                <tr role="row">
                    <th tabindex="0" rowspan="1" colspan="1" style="width: 168px;">Họ tên</th>
                    <th role="columnheader" tabindex="0" rowspan="1" colspan="1"  style="width: 121px;">Email</th>
                    <th class="hidden-phone"  tabindex="0" rowspan="1" colspan="1" style="width: 197px;">Số điện thoại </th>
                    <th class="hidden-480" tabindex="0" rowspan="1" colspan="1" style="width: 164px;">Chức vụ</th>
                    <th  rowspan="1" colspan="1" aria-label="" style="width: 161px;">Tùy chỉnh</th>
                </tr>
                </thead>

                <tbody>
                    <?php
                        foreach($data as $value){
                            ?>
                                <tr class="odd">
                                    <td>
                                        <?php echo $value['name']; ?>
                                    </td>
                                    <td class="product-table-title"><a href=""><?php echo $value['username']; ?></a></td>
                                    <td class="hidden-phone "><?php echo $value['phone']; ?></td>
                                    <td class="hidden-480">
                                        <?php
                                            if($value['level'] == 1){
                                                echo "Administrator";
                                            }else{
                                                echo "Member";
                                            }
                                        ?>
                                    </td>
                                    <td class="hidden-480 product-table-icon">
                                        <a href="<?php echo ROOT_URL."admin/profile/".$value['uid']; ?>"><i class="icon-edit"></i></a>
                                    </td>
                                </tr>
                            <?php
                        }
                    ?>
                </tbody>
            </table>

            <?php
            if($numberPage >= 2){
                ?>
                <div class="row-fluid">
                    <div id="paging" class="dataTables_paginate paging_bootstrap pagination">
                        <ul>
                            <li value="before"><a href="#"><i class="icon-double-angle-left"></i></a></li>
                            <?php
                            for($i = 0; $i< $numberPage; $i++){
                                if(isset($_POST['paging'])){
                                    if($_POST['paging'] == $i){
                                        echo '<li value="'.$i.'" class="active"><a href="#">'.($i+1).'</a></li>';
                                    }else{
                                        echo '<li value="'.$i.'"><a href="#">'.($i+1).'</a></li>';
                                    }
                                }else{
                                    if($i == 0){
                                        echo '<li value="'.$i.'" class="active"><a href="#">'.($i+1).'</a></li>';
                                    }else{
                                        echo '<li value="'.$i.'"><a href="#">'.($i+1).'</a></li>';
                                    }
                                }
                            }
                            ?>
                            <li value="after" class="next"><a href="#"><i class="icon-double-angle-right"></i></a></li>
                        </ul>
                        <input type="hidden" id="page" value="0" name="paging">
                    </div>
                </div>
            <?php
            }
            ?>
        </div>
    </form>
</div>